"""
输入一个字符串返回满足以下条件的字符串
■ 如果字符串长度大等于3，添加 'ing' 到字 符串的末尾
■ 如果字符串是以 'ing' 结尾的，就在末尾添 加 'ly'
■ 如果字符串长度小于3，返回原字符串
"""
s = input()
sLength = len(s)
if (sLength < 3):
    print(s)
elif(sLength >=3):
    if(s.endswith('ing')):
        s = '{}ly'.format(s)
    else:
        s = '{}ing'.format(s)
    print(s)


#测试正确，答案：
"""
   "source": [
    "s=input('input an English word：')\n",
    "if s.endswith(\"ing\"):\n",
    "    s=s+'ly'\n",
    "    print(s)\n",
    "elif len(s)>=3:\n",
    "    s=s+'ing'\n",
    "    print(s)\n",
    "else:\n",
    "    print(s)"
   ]
"""